Xbasic

*gzip_blob Function

Syntax

B *GZIP_BLOB(data as b[,nativeFormat as l])

Arguments

dataBinary

The binary data to compress.

nativeFormatLogical

Use native format. Set to .t. for most reliable results round trip.

Description

Compress blob using gzip.

Example

dim pngdata as b = file.to_blob("e:\dev\category.bmp")
? pngdata.size() = 10746

dim zipped as b = *gzip_blob(pngdata,.t.)
? zipped.size() = 4891

dim unzipped as b = *gunzip_blob(zipped,.t.)
? unzipped.size() = 10746

? pngdata = unzipped
= .T.

See Also